package com.ygp.safe;

/**
 * getValue
 *
 * @author linmiaolai@sanyygp.com<br>
 * @version 1.0<br>
 * @date 2021/08/27 <br>
 */
public class SynchronizedInteger {
    private int value;

    public synchronized int getValue() {
        return value;
    }

    public synchronized void setValue(int value) {
        this.value = value;
    }


    public int get() {
        synchronized (this) {
            return value;
        }
    }
}
